<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>AJAX 操作</title>
    <style>
        #box{
            padding: 20px;
            background-color: #feeeed;
        }
    </style>
</head>
<body>
    <h1>ajax</h1>
    <hr>
    <button>加载</button>

    <div id="box"></div>

    <script src="__PUBLIC__/js/jquery.min.js"></script>
    <script>
    $(document).ready(function(){
        $('button').click(function (){
            // alert(11);
            /*$.ajax({
                type:'get',
                url:"<{:U('Stu/doAjax')}>",
                dateType:'json',
                success:function (data){
                    console.log(data);
                }
            })*/

            $.ajax({
                url:"<{:U('User/index')}>",
                success:function(data){
                    $('#box').html(data);
                }
            })
        })
    })
    </script>
</body>
</html>